package com.five.controller.backstage;

import com.five.dao.backstage.RuZhuDetaDao;
import com.five.entity.backstage.RuZhuDetail;
import com.five.util.LayTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName RuZhuDetailController
 * @Description TODO
 * @Author yuanshuaiqiang
 * @Date 2020/12/2 15:57
 */
@RestController
@RequestMapping("ruzhudetail")
public class RuZhuDetailController {

    @Autowired
    private RuZhuDetaDao ruZhuDetaDao;
    @RequestMapping("queryAll")
    public LayTable queryAll(Integer page, Integer limit, RuZhuDetail ruZhuDetail){
        List<Map> maps = ruZhuDetaDao.queryAll(page,limit,ruZhuDetail);
        //查询数据总条数
        int i=ruZhuDetaDao.getcount(ruZhuDetail);
        LayTable layTable = new LayTable(i, maps);
        return layTable;
    }
}
